package com.xauto.pioneer.appuser.activity.mine;

import android.support.annotation.IdRes;
import android.util.Log;
import android.view.View;
import android.widget.RadioGroup;

import com.xauto.pioneer.appuser.R;
import com.xauto.pioneer.appuser.activity.BaseActivity;
import com.xauto.pioneer.appuser.view.TopBar;

import butterknife.Bind;

/**
 * Created by Administrator on 2018/5/24.
 */

public class ParkingAutoPayActivity extends BaseActivity {
    @Bind(R.id.parkingautopay_topBar)
    TopBar parkingautopay_topBar;
    @Bind(R.id.rg_parkingautopay)
    RadioGroup rg_parkingautopay;
    @Override
    protected int getContentView() {
        return R.layout.ac_parkingautopay;
    }

    @Override
    protected void initView() {
        parkingautopay_topBar.showView(TopBar.LEFT_IMAGE_BTN, TopBar.TITLE);
        parkingautopay_topBar.setImage(TopBar.LEFT_IMAGE_BTN, R.mipmap.ic_common_left);
        parkingautopay_topBar.setText(TopBar.TITLE, R.string.mine_parkingautopay);
        parkingautopay_topBar.setLeftOnClick(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        rg_parkingautopay.setOnCheckedChangeListener(listener);
    }

    @Override
    protected void initData() {

    }
    private RadioGroup.OnCheckedChangeListener listener = new RadioGroup.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {
            switch (group.getCheckedRadioButtonId()){
                case R.id.parkingautopay_first:
                    Log.e("tag","1");
                    break;
                case R.id.parkingautopay_second:
                    Log.e("tag","2");
                    break;
                case R.id.parkingautopay_third:
                    Log.e("tag","3");
                    break;
                case R.id.parkingautopay_fourth:
                    Log.e("tag","4");
                    break;
            }
        }
    };
}
